﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUS.ISS.ARS.BusinessComponent;
using NUS.ISS.ARS.BusinessEntity;
using NUS.ISS.ARS.BusinessEntity.ViewModels;
using NUS.ISS.ARS.BusinessFacade.Interface;
using NUS.ISS.ARS.Common;

namespace NUS.ISS.ARS.BusinessFacade
{
    public class BookingBF:IBookingBF
    {
        private FlightBookingBC _flightBookingBC;

        public BookingBF()
        {
            _flightBookingBC = new FlightBookingBC();
        }

        public IEnumerable<FlightBookingTripView> GetFlightBookingsByRefNoAndName(string refNo, string firstName, string lastName)
        {
            return _flightBookingBC.GetFlightBookingsByRefNoAndName(refNo, firstName, lastName);
        }


        public List<long> FlightBookingTripIdByFlightBookingId(long flightbookingid)
        {

            return _flightBookingBC.FlightBookingTripIdByFlightBookingId(flightbookingid);
        }

        public IEnumerable<FlightBookingTripView> GetAllFlightBookings()
        {
            return _flightBookingBC.GetAllFlightBookings();
        }

        public IEnumerable<City> GetAllFlightCities()
        {
            return _flightBookingBC.GetAllFlightCities();
        }

        public IEnumerable<FlightBookingTripView> SearchFlights(ReservationViewObject ReservationData)
        {
            return _flightBookingBC.SearchFlights(ReservationData);
        }

        public List<int> GetNumOfPassengersArrayByBookingRefNo(string refNo)
        {
            return _flightBookingBC.GetNumOfPassengersArrayByBookingRefNo(refNo);
        }

        public PriceSummaryView GetPriceSummary(IEnumerable<FlightBookingTripView> trips, bool isManageBooking)
        {
            return _flightBookingBC.GetPriceSummary(trips, isManageBooking);
        }

        public SaveResult SaveChangedBookings(IEnumerable<FlightBookingTripView> trips)
        {
            return _flightBookingBC.SaveChangedBookings(trips);
        }

        public FlightBookingTripView GetFlightBookingsById(long id)
        {
            return _flightBookingBC.GetFlightBookingsById(id);
        }
        public CancelBookingTripView GetFlightBookingsByFlightBooking(long id)
        {
            return _flightBookingBC.GetFlightBookingsByFlightBooking(id);
        }
        public SaveResult SaveChangedBooking(CancelBookingTripView cancelBookingTripView)
        {
            return _flightBookingBC.SaveChangedBooking(cancelBookingTripView);
        }       
        public SaveResult CreateBookings(ReservationViewObject data)
        {
            return _flightBookingBC.CreateBookings(data);
        }
    }
}
